#ifndef WINDOW_H
#define WINDOW_H

#include <ncurses.h>

class Window {
public:
	Window(WINDOW* win);
	Window(int width, int height, int x = 0, int y = 0, bool hasBorder = false);
	virtual ~Window();
	inline WINDOW *window() const;
	void reposition(int x, int y);
	virtual void refresh();
	void clear();
	
	inline void setBorder(bool hasBorder);
	
	void enableAttributes(int flags);
	void disableAttributes(int flags);
	
	inline int x() const { return m_x; }
	inline int y() const { return m_y; }
	inline int width() const { return m_width; }
	inline int height() const { return m_height; }
private:
	int m_width, m_height;
	int m_x, m_y;
	WINDOW* m_window;
	bool m_hasBorder;
};

inline WINDOW* Window::window() const {
	return m_window;
}

inline void Window::setBorder(bool hasBorder) {
	m_hasBorder = hasBorder;
}

#endif